package cn.snmp.mutual.uk.pdu;

import java.util.*;

import cn.snmp.mutual.uk.stack.GetBulkPdu;
import cn.snmp.mutual.uk.stack.SnmpContextBasisFace;
import cn.snmp.mutual.uk.stack.Varbind;

public class OneGetBulkPdu extends GetBulkPdu {
    private static final String version_id = "@(#)$Id: OneGetBulkPdu.java,v 3.9 2006/01/17 17:43:53 birgit Exp $ Copyright Westhawk Ltd";
    Vector vars;

    public OneGetBulkPdu(final SnmpContextBasisFace con) {
        super(con);
        this.vars = new Vector();
    }

    public Vector getVarbinds() {
        return this.vars;
    }

    @Override
    protected void new_value(final int n, final Varbind a_var) {
        if (n == 0) {
            this.vars = new Vector();
        }
        this.vars.addElement(a_var);
    }

    @Override
    protected void tell_them() {
        this.notifyObservers(this.vars);
    }
}
